﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Theme="SkinFile" Inherits="Nivdal.MatschSentencesTranslated" Title="" Codebehind="MatschSentencesTranslated.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Panel ID="DirectionPanel" runat="server" Direction="LeftToRight">
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="PageTitleLabel" runat="server" Text="<%$ Resources:Resource, Translate_PageNameLabelText %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">

    

    <asp:HyperLink ID="BackToTranslatingHyperlink1" runat="server" SkinID="GreenTitleHyperLink" 
    NavigateUrl="~/TranslateMatchSentences.aspx" Text="Back to translation"></asp:HyperLink>
    <br /><br />
    <asp:UpdatePanel ID="TranslatedSentencesUpdatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:Label ID="AllTranslatedSentencesTitleLabel" runat="server" Text="All translated match sentences" SkinID="InfoLabel"></asp:Label>
            
            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="TranslatedSentencesUpdatePanel">
                <ProgressTemplate>
                    <div class="ajaxloader">
                        <asp:Image ID="EditProgressImage" runat="server" ImageUrl="~/Images/ajax-loader.gif" />
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
            
            <asp:GridView ID="TranslatedSentencesGridView" runat="server" SkinID="Professional" AutoGenerateColumns="false"
             AllowPaging="false" DataSourceID="ShowStadiumsValuesSqlDataSource">
                <Columns>
                    <asp:TemplateField HeaderText="<%$ Resources:Resource, TranslatedSentences_SentenceNumNumHeaderText %>">
                        <ItemTemplate>
                            <asp:Label ID="SentenceNumLabel" runat="server" Text='<%# Eval("SentenceNum") + "." + Eval("SentencePart") %>' SkinID="GridLabel"></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:Label ID="SentenceNumLabel" runat="server" Text='<%# Eval("SentenceNum") + "." + Eval("SentencePart") %>' SkinID="GridLabel"></asp:Label>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Resource, TranslatedSentences_EnglishTextHeaderText %>">
                        <ItemTemplate>
                            <asp:Label ID="EnglishTextLabel" runat="server" Text='<%# Eval("EnglishText") %>' SkinID="GridLabel"></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:Label ID="EnglishTextLabel" runat="server" Text='<%# Eval("EnglishText") %>' SkinID="GridLabel"></asp:Label>
                        </EditItemTemplate>                        
                    </asp:TemplateField>
                    <asp:TemplateField  HeaderText="<%$ Resources:Resource, TranslatedSentences_TextHeaderText %>">
                        <ItemTemplate>
                            <asp:Label ID="TranslationLabel" runat="server" Text='<%# Eval("Translation") %>' SkinID="GridLabel"></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:HiddenField ID="SentenceIdHiddenField" runat="server" Value='<%# Bind("SentenceId") %>' />
                            <CustomControls:TextArea ID="TranslationTextBox" runat="server" TextMode="MultiLine" 
                            Width="250px" Height="80px" MaxLength="512" Text='<%# Bind("Translation") %>'></CustomControls:TextArea>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton ID="EditLinkButton" runat="server" SkinID="GreenTitleLink" CommandName="Edit"
                             Text="<%$ Resources:Resource, Global_Edit %>"></asp:LinkButton>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:LinkButton ID="UpdateLinkButton" runat="server" CommandName="Update" SkinID="GreenTitleLink"
                            Text="<%$ Resources:Resource, Global_Update %>"></asp:LinkButton>
                            <asp:LinkButton ID="CancelLinkButton" runat="server" CommandName="Cancel" SkinID="GreenTitleLink"
                            Text="<%$ Resources:Resource, Global_Cancel %>"></asp:LinkButton>
                        </EditItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <asp:Label ID="NothingTranslatedYetLabel" runat="server" Text="No match sentences were translated yet" SkinID="GridLabel"></asp:Label>
                </EmptyDataTemplate>
            </asp:GridView>
            <asp:SqlDataSource ID="ShowStadiumsValuesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetTranslatedMatchSentences" SelectCommandType="StoredProcedure"
            UpdateCommand="Nivdal_EditMatchSentence" UpdateCommandType="StoredProcedure">
                <UpdateParameters>
                    <asp:Parameter Type="Decimal" Name="SentenceId" />
                    <asp:Parameter Type="String" Name="Translation" />
                </UpdateParameters>
            </asp:SqlDataSource>
        </ContentTemplate>        
    </asp:UpdatePanel>
    <br /><br />
    <asp:UpdatePanel ID="SkippedSentencesUpdatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>            
            <asp:Label ID="AllSkippedSentencesTitleLabel" runat="server" Text="All skipped sentences" SkinID="InfoLabel"></asp:Label>
            
            <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="SkippedSentencesUpdatePanel">
                <ProgressTemplate>
                    <div class="ajaxloader">
                        <asp:Image ID="UnskipProgress" runat="server" ImageUrl="~/Images/ajax-loader.gif" />
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
            
            <asp:GridView ID="SkippedSentencesGridView" runat="server" SkinID="Professional" AutoGenerateColumns="false"
             AllowPaging="false" DataSourceID="SkippedMatchSentencesDatasource" OnRowCommand="UnskipSentence">
                <EmptyDataTemplate>
                    <asp:Label ID="NothingSkipped" runat="server" Text="No match sentences translation was skipped"></asp:Label>
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Label ID="SentenceLabel" runat="server" Text='<%# Eval("Sentence") %>' SkinID="GridLabel"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton ID="UnignoreLinkButton" runat="server" Text="Unskip" SkinID="GreenTitleLink"
                             CommandName="Unskip" CommandArgument='<%# Eval("IgnoreId") %>'></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="SkippedMatchSentencesDatasource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetSkippedMatchSentences" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
            
        </ContentTemplate>
    </asp:UpdatePanel>
    <br /><br />
    <asp:HyperLink ID="BackToTranslationHyperlink2" runat="server" SkinID="GreenTitleHyperLink" 
        NavigateUrl="~/TranslateMatchSentences.aspx" Text="Back to translation"></asp:HyperLink>
    </asp:Panel>
    </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" Runat="Server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, Translate_PageNameLabelText %>" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

